Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix video player crash #1867

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Fix video player crash #1867

merged 1 commit into from
Jul 25, 2024

Conversation

cewert
Copy link
Member

@cewert cewert commented Jul 25, 2024

Validate video duration is longer than the default value of 0 before dividing to prevent crash. This comes from the roku crash log.

Crashlog:

m                roAssociativeArray refcnt=2 count:23 
global           Interface:ifGloba$1 Local Variables: 
   file/line: pkg:/components/video/VideoPlayerView.brs(538) 
#0  Function onpositionchanged() As Voi$1 Backtrace: 
Divide by Zero. (runtime error &h14) in pkg:/components/video/VideoPlayerView.brs(538)

which points to this line after running build-prod on 2.1.2:

m.osd.progressPercentage = m.top.position / m.top.duration

Issues

Ref #1164

Introduced in #1491

@cewert cewert added the bug-fix This fixes a bug. label Jul 25, 2024
@cewert cewert requested a review from a team as a code owner July 25, 2024 13:49
@cewert cewert merged commit 4dccbc0 into jellyfin:2.1.z Jul 25, 2024
13 checks passed
@cewert cewert deleted the fix-videoplayer-crash branch July 25, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix This fixes a bug.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants